Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-377
authorMiles Bader <miles@gnu.org>
Sun, 6 Jun 2004 09:49:12 +0000 (09:49 +0000)
committerMiles Bader <miles@gnu.org>
Sun, 6 Jun 2004 09:49:12 +0000 (09:49 +0000)
(Fdisplay_supports_face_attributes_p): Work around bootstrapping problem

src/ChangeLog
src/xfaces.c

index a682b0244d5787491d725e70c99e4beebc5bb136..85ddf2810a5145fcadc3b1236d96c41afeb5f560 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-06  Miles Bader  <miles@gnu.org>
+
+       * xfaces.c (Fdisplay_supports_face_attributes_p): Give up
+       immediately if non-interactive or not initialized.
+
 2004-06-05  Richard M. Stallman  <rms@gnu.org>
 
        * minibuf.c (Fcompleting_read): Doc fix.
index fc665ce3bd5fc11eb44441a5f795375f7dbcdecf..d2cf2e24d08d6fd6cd00a32f1e1cdb8e69b9bdd3 100644 (file)
@@ -6027,6 +6027,12 @@ face for italic. */)
   struct face *def_face;
   Lisp_Object attrs[LFACE_VECTOR_SIZE];
 
+  if (noninteractive || !initialized)
+    /* We may not be able to access low-level face information in batch
+       mode, or before being dumped, and this function is not going to
+       be very useful in those cases anyway, so just give up.  */
+    return Qnil;
+
   if (NILP (display))
     frame = selected_frame;
   else if (FRAMEP (display))